/**
*      author: Y_Yao
*      created: 2024-12-28 20:26:30
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
const int N = 1e9 + 7;
const int M = 2e5 + 7;
int X[M],Y[M];
char C[M];
int n,m;

void solve()
{
    cin >> n >> m;
    for(int i = 1;i <= m;i++)
    {
        cin >> X[i] >> Y[i] >> C[i];
    }

    unordered_map<int,int> bhash_h;
    unordered_map<int,int> bhash_l;
    unordered_map<int,int> whash_h;
    unordered_map<int,int> whash_l;
    for(int i = 1;i <= m;i++)
    {
        if(C[i] == 'B')
        {
            if(Y[i] >= bhash_h[X[i]])
            {
                bhash_h[X[i]] = Y[i];
            }
            else if(Y[i] < bhash_h[X[i]])
            {
                cout << "No" << endl;
                return;
            }

            if(X[i] >= bhash_l[Y[i]])
            {
                bhash_l[Y[i]] = X[i];
            }
            else if(X[i] < bhash_l[Y[i]])
            {
                cout << "No" << endl;
                return;
            }
        }
        else if(C[i] == 'W')
        {
            if(whash_h[X[i]] == 0)
            {
                whash_h[X[i]] = n;
            }
            if(whash_l[Y[i]] == 0)
            {
                whash_l[Y[i]] = n;
            }

            if(Y[i] <= whash_h[X[i]])
            {
                whash_h[X[i]] = Y[i];
            }
            else if(Y[i] > whash_h[X[i]])
            {
                cout << "No" << endl;
                return;
            }

            if(X[i] <= whash_l[Y[i]])
            {
                whash_l[Y[i]] = X[i];
            }
            else if(X[i] > whash_l[Y[i]])
            {
                cout << "No" << endl;
                return;
            }
        }
    }

    for(auto& e : bhash_h)
    {
        if(whash_h[e.first] == 0)
        {
            whash_h[e.first] = n;
        }
        if(e.second >= whash_h[e.first])
        {
            cout << "No" << endl;
            return;
        }
    }

    for(auto& e : bhash_l)
    {
        if(whash_l[e.first] == 0)
        {
            whash_l[e.first] = n;
        }
        if(e.second >= whash_l[e.first])
        {
            cout << "No" << endl;
            return;
        }
    }

    cout << "Yes" << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}